<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();

    String basePath = request.getScheme() + "://" + request.getServerName() + ":"
                      + request.getServerPort() + path + "/";
    //<script type="text/javascript"
	//src="/js/easyui/jquery-1.7.2.min.js"></script>
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>修改权限</title>
<s:include value="../include.jsp"></s:include>
<link rel="stylesheet" type="text/css" href="../css/ztree/demo.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>css/ztree/zTreeStyle/zTreeStyle.css">
<script type="text/javascript"
	src="<%=basePath%>js/ztree/jquery.ztree.core-3.3.js"></script>

<script type="text/javascript">	


	/**
	 * 保存
	 */
	function save() {
		//检验
		var lName = document.getElementById("limitName").value;
		lName = trimVal(lName);
		if (lName == "") {
			alert("权限名是必填项");
			return;
		}
		var lmemo = document.getElementById("memo").value;
		lmemo = trimVal(lmemo);
		if (lmemo == "") {
			alert("权限描述是必填项");
			return;
		}
		
		chgAction("limitAction", "update");
		document.forms[0].submit();
	}
	
	

	/**
	 * 返回
	 */
	function back() {
		window.location = "limitAction.action";
	}
	<s:if test="operateResult=='suc'">
	alert("保存成功");
	window.location = "limitAction!query.action";
	</s:if>
	<s:elseif test="operateResult=='fail'">
	alert("保存失败");
	</s:elseif>
</script>
</head>
<body>
	<div class="outerDiv" style="height:500px;overflow-y: auto;">
		<s:form name="form1" action="limitAction" method="post">
			<div class="top_box">
				您的位置：系统权限管理&gt;&gt;<span class="red">修改权限</span>
			</div>
			
			<div class="form_list_box">
				<table width="100%">
					<tr>
						<td align="right" width="40%"><font color="red">*</font>权限名：</td>
						<td align="left"><s:textfield name="limits.limitName"
								id="limitName" maxlength="25"></s:textfield>
						</td>
					</tr>
					<tr>
						<td align="right" width="40%"><font color="red">*</font>描&nbsp;&nbsp;&nbsp;&nbsp;述：</td>
						<td align="left"><s:textfield name="limits.memo"
								id="memo" maxlength="25"></s:textfield>
						</td>
					</tr>
				</table>
				<div class="btn_box">
					<a href="#" onclick="save()"><s></s>保存</a> <a href="#"
						onclick="back()"><s></s>返回</a>
				</div>
			</div>
		</s:form>
	</div>
</body>
</html>